﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization;

using VSTalk.Tools;

namespace VSTalk.Model
{
    [DataContract]
    public class Interlocutor : INotifyPropertyChanged
    {
        private Guid _id;

        private string _name;

        private string _groupName;

        private bool _subscribed;

        private string _user;
        
        private string _server;

        #region PROPERTIES

        [DataMember]
        public Guid Id
        {
            get { return _id; }
            set
            {
                _id = value;
                PropertyChanged.Notify(() => Id);
            }
        }

        [DataMember]
        public string User
        {
            get { return _user; }
            set { _user = value;
                PropertyChanged.Notify(() => User);
            }
        }

        [DataMember]
        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                PropertyChanged.Notify(() => Name);
            }
        }

        [DataMember]
        public string GroupName
        {
            get { return _groupName; }
            set
            {
                _groupName = value;
                PropertyChanged.Notify(() => GroupName);
            }
        }

        [DataMember]
        public bool Subscribed
        {
            get { return _subscribed; }
            set
            {
                _subscribed = value;
                PropertyChanged.Notify(() => Subscribed);
            }
        }

        [DataMember]
        public string Server
        {
            get { return _server; }
            set
            {
                _server = value;
                PropertyChanged.Notify(() => Server);
            }
        }

        #endregion PROPERTIES

        public event PropertyChangedEventHandler PropertyChanged;
    }

}